A push service is currently one of numerous terminal services. The push service mainly refers to that after a terminal establishes a connection with a service push server, the connection may always be maintained. When the server needs to send a message to the terminal, the message may be sent to the terminal in real time by using the connection.
A mobile phone on which instant messaging software is installed is used as an example. After a push function of the software is enabled, even if the software is in a disabled state, the mobile phone may receive, in real time, a session message sent by another terminal and display the received session message on a screen.
A key point for service push is that the terminal needs to establish a persistent connection with the server. The established connection is referred to as a persistent connection because the terminal needs to maintain a connected state of the persistent connection with the server. In the prior art, a method for maintaining the persistent connection is mainly sending a heartbeat message. Specifically, a push agent program is set on the side of an application processor (AP). The push agent is used to communicate with a provider server of an application program that enables the push function, and query whether a push message arrives. When a push message arrives, a push server providing the push service sends, to the push agent by using a socket that is maintained for a long time, a notification that the push message arrives. When no push message has arrived within a specific time, the push agent needs to regularly wake up the AP to send a heartbeat message to the push server, so as to maintain a socket link. In a process of sending a heartbeat message, a modem needs to be further invoked to translate a digital signal of the terminal into a pulse signal that can be propagated through an air interface network.
In terms of hardware, the AP and the modem are two chips or structures that have different functions. Therefore, in the prior art, a method for sending a heartbeat message needs to be executed by using both of the two hardware architectures: the AP and the modem. Power consumption is relatively high, and the heartbeat message needs to be sent periodically. This further causes larger average standby power consumption of the terminal, and shortens a standby time of the terminal.